-
Notifications
You must be signed in to change notification settings - Fork 161
Fixing the missing sources and javadoc Maven artifacts #25660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Signed-off-by: Atwijukire Ariho Seth <[email protected]>
|
Hello @OndroMih, I need some help with this issue.
Please, may you help me here on how to continue? |
|
Hi, @Ariho-Seth, it wouldn't be this simple. Your changes expect that the root pom.xml is an aggregator but GlassFish's build is a bit more complicated. The aggregate goal expects that all the modules were built already, and then goes through them and aggregates their outputs. And that can't be done with a single maven run, it would have to be another step, e.g. We want to have sources and javadoc attached to the following artifacts:
For the first 2 options, these are GlassFish server distributions and wouldn't be used as Maven dependencies, so sources are not so useful. However, it still would make sense to save a snapshot of the sources together with the distributed artifacts. To build the source and javadoc artifacts, it's not enough to run the source and javadoc plugins in those modules. They don't contain sources, we need to extract sources and javadoc from their dependencies. For javadoc, it should be enough to set For sources, it's not so straightforward. The source plugin doesn't support a property similar to
Here's an example project where this approach worked for us for building sources from dependencies : https://github.com/OmniFish-EE/jnosql-extensions-jakarta-data/blob/5f57e1b5900e61b46e7665024b09fc807fdf2733/jnosql-jakarta-persistence/jnosql-jakarta-persistence-driver-osgi-bundle/pom.xml#L139 |
This reverts commit 2d58203.
Signed-off-by: Atwijukire Ariho Seth <[email protected]>
|
Hello @OndroMih, Please take a look at the changes I've made, though the |
Signed-off-by: Atwijukire Ariho Seth <[email protected]>
Signed-off-by: Atwijukire Ariho Seth <[email protected]>
Signed-off-by: Atwijukire Ariho Seth <[email protected]>
|
@Ariho-Seth , it seems that the maven javadoc plugin doesn't support creating javadoc for non-jar Maven modules. The glassfish server Maven modules are of type ZIP and thus javadoc jar goal will just do nothing. Can you switch focus to Embedded GlassFish? There it could work. |
|
For Embedded GlassFish, he javadoc plugin complains that "No Javadoc in project. Archive not created". And that's true - these modules only aggregate dependencies, they don't have sources or javadoc. Maybe, in the end, we'll need to resort to calling javadoc directly. The javadoc plugin supports passing options to javadoc, using the additionalJOptions configuration properties. But I'm not sure if we can pass some properties so that the plugin will run even if there are no sources in the maven module. If not, then we'll probably need to execute the javadoc tool directly, using the exec maven plugin. |
This draft PR adds the
maven-source-pluginin theglassfish-main-aggregatorpom file, which generates thesources.jarfileAnd two plugins ie
maven-javadoc-pluginandmaven-source-pluginin theglassfish-embedded-allpom fileFixes #24278